<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:controls="clr-namespace:Apex.Controls"
    xmlns:converters="clr-namespace:Apex.Converters">

    <converters:StringNullOrEmptyToVisibilityConverter x:Key="StringNullOrEmptyToVisibilityConverter" />

    <LinearGradientBrush x:Key="CueTextBoxBorder" EndPoint="0,20" MappingMode="Absolute" StartPoint="0,0">
        <GradientStop Color="#ABADB3" Offset="0.05"/>
        <GradientStop Color="#E2E3EA" Offset="0.07"/>
        <GradientStop Color="#E3E9EF" Offset="1"/>
    </LinearGradientBrush>

    <Style TargetType="controls:CueTextBox">
      <!--  <Setter Property="Background" Value="{StaticResource {SystemColors.WindowBrushKey}}" /> -->
        <Setter Property="BorderBrush" Value="{StaticResource CueTextBoxBorder}" />
        <!--     <Setter Property="Foreground" Value="{StaticResource {SystemColors.ControlTextBrushKey}}" /> -->
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Padding" Value="1"/>
        <Setter Property="AllowDrop" Value="true"/>
       <!-- <Setter Property="FocusVisualStyle" Value="{x:Null}"/> -->
       <!-- <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/> -->
       <!-- <Setter Property="Stylus.IsFlicksEnabled" Value="False"/> -->
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="controls:CueTextBox">
                    <Border x:Name="Border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}"
                  BorderThickness="{TemplateBinding BorderThickness}">
                        <Grid x:Name="LayoutGrid">
                            <ScrollViewer Margin="2" x:Name="PART_ContentHost" Grid.Column="0" />
                            <TextBlock 
                                x:Name="PART_CueLabel"  Margin="2" Grid.Column="0" 
                                Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=CueText}"
                                Visibility="{Binding Path=Text, RelativeSource={RelativeSource TemplatedParent}, 
                                Converter={StaticResource StringNullOrEmptyToVisibilityConverter}, ConverterParameter=Invert}"
                                   Foreground="#999999"
                     Padding="2,0,0,0"
                     FontStyle="Italic" />
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>
